<template>
	<view class="container">
		<scroll-view class="scroll-view_H" scroll-y="true">
			<view class="visitor">
				<text class="f-s-28 color-323232 m-t-15">应退金额</text>
				<text class="f-s-40 color-323232 m-t-5 m-b-5">￥3456</text>
				<text class="f-s-22 color-999 m-b-15">应退金额=押金余额+医保报销金额</text>
				<view class="timeView m-t-10">
					<view class="flex align-center justify-between" style="width: 94%;">
						<text>已缴押金</text>
						<text>￥1980</text>
					</view>
					<view class="flex align-center justify-between p-t-10 p-b-10" style="width: 94%;border-bottom: 1px dashed #a6a6a6;">
						<text>费用实际支出</text>
						<text>￥1980</text>
					</view>
					<view class="flex align-center justify-between m-t-10" style="width: 94%;">
						<text>押金余额</text>
						<text>￥1980</text>
					</view>
					<view class="flex align-center justify-between m-t-10" style="width: 94%;">
						<text>医保报销</text>
						<text>￥1980</text>
					</view>
					<view class="flex align-center justify-end m-t-10" style="width: 94%;">
						<text style="color: #FF6430;" class="f-s-22">预计报销金额，实际以医保局确认为准</text>
					</view>

				</view>
			</view>

			<view class="details">
				<view class="title">
					支出明细
				</view>

				<view class="items">
					<view class="item">
						<view class="item_title">
							<view class="name titles">
								项目名称
							</view>
							<view class="price titles">
								单价（元）
							</view>
							<view class="num titles">
								数量
							</view>
							<view class="total titles">
								总价（元）
							</view>
						</view>
						<view class="item_title" v-for="(item,index) in detailList" :key="index">
							<view class="name">复访托吡卡眼液</view>
							<view class="price">12.4</view>
							<view class="num">1</view>
							<view class="total">89.5</view>
						</view>
					</view>
				</view>
			</view>

		</scroll-view>
		<!-- 确认结算弹窗-->
		<u-modal :show="isShow" title="是否确认结算?" :content='content' :showCancelButton="true" @confirm="sure" @cancel="cancel"></u-modal>
		<view class="to-register" @click="sureSettlement">
			<u-button type="primary" text="去结算"></u-button>
		</view>
	</view>
</template>

<script>
	import {
		getDictType
	} from "@/api/system/public.js";
	export default {
		components: {

		},
		data() {
			return {
				content: '退款金额预计将在X个工作日内退回原付款账户',
				isShow: false,
				detailList: [1, 2, 3, 4, 5, 6, 7, 8, 9]
			}
		},
		onLoad(options) {

		},
		methods: {
			/* 去结算 */
			sureSettlement() {
				this.isShow = true
			},
			sure() {
				this.isShow = false
				uni.navigateTo({
					url: '/pages/home/settlementOutHospital/settlementDetailed'
				})
			},
			cancel() {
				this.isShow = false
			}

		}
	}
</script>

<style lang="scss">
	page {
		background-color: rgb(245, 245, 245);
		height: 100%;

		.container {
			width: 100%;
			height: 100%;

			.scroll-view_H {
				width: 100%;
				height: calc(100vh - 120rpx);

				.details {
					// width: 95%;
					margin: 0 24rpx;
					background-color: #fff;
					border-radius: 8px;
					padding: 0 24rpx 24rpx 24rpx;

					.title {
						    padding: 24rpx 0;
						    border-bottom: 1px solid #eee;
						    color: #333;
						    font-weight: bold;
					}

					.items {
						.item {
							.item_title {
								display: flex;
								align-items: center;
								justify-content: space-between;
								text-align: center;
								padding: 14rpx 0;

								.name {
									flex: 1;
									text-align: left;
									overflow: hidden;
									white-space: nowrap;
									text-overflow: ellipsis;
								}

								.price {
									width: 23%;
								}

								.num {
									width: 15%;
								}

								.total {
									width: 23%;
								}

								.titles {
									padding: 12rpx 0 0 0;
									color: #999;
								}
							}
						}
					}
				}

				.timeView {
					width: 100%;
					background-color: #F5F5F5;
					border-radius: 8px;
					display: flex;
					align-items: center;
					flex-direction: column;
					margin-top: 6px;
					padding: 24rpx 0;
				}

				.visitor {
					// width: 95%;
					margin: 24rpx;
					background-color: #fff;
					border-radius: 8px;
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: space-between;
					padding: 24rpx;
				}
			}

		}

	}

	.to-register {
		width: 100%;
		padding: 0 20rpx;
		position: fixed;
		bottom: 10px;
	}
</style>
